/*
* @Author: wanghongfucoder
* @Date:   2017-03-21 10:55:27
* @Last Modified by:   wanghongfucoder
* @Last Modified time: 2017-03-21 11:02:46
*/

public class BinaryObserver extends Observer {
	
	public BinaryObserver(Subject subject){
		this.subject=subject;
		this.subject.attach(this);
	}

	public void update(){
		System.out.println("BinaryObserver : "+Integer.toBinaryString(subject.getState()));
	}
}